<template>
  <div class="app-container">
    <el-tabs v-model="activeTab" @tab-click="handleClick">
      <el-tab-pane :label="$t('shift_library')" name="1">
        <classesRecord ref="classesRecord"></classesRecord>
      </el-tab-pane>
      <el-tab-pane :label="$t('cyclical_shift_library')" name="2">
        <cycleRecord ref="cycleRecord"></cycleRecord>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import classesRecord from "./classesRecord.vue";
import cycleRecord from "./cycleRecord.vue";
export default {
  name: "schedulingSetting",
  components: {
    classesRecord,
    cycleRecord,
  },
  data() {
    return {
      activeTab: "1",
    };
  },
  created() {},
  methods: {
    handleClick(e) {
      if (e.name == 1) {
        this.$refs.classesRecord.handleQuery();
      } else if (e.name == 2) {
        this.$refs.cycleRecord.handleQuery();
      }
    },
  },
};
</script>
<style scoped></style>
